home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsITreeSelection.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  147 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Dave Hyatt <hyatt@mozilla.org> (Original Author)
  24.  *   H├Ñkan Waara <hwaara@chello.se>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  28.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. interface nsITreeBoxObject;
  41.  
  42. #include "nsISupports.idl"
  43.  
  44. [scriptable, uuid(F8A13364-184E-4da3-BADF-5C04837537F8)]
  45. interface nsITreeSelection : nsISupports
  46. {
  47.   /**
  48.    * The tree widget for this selection.
  49.    */
  50.   attribute nsITreeBoxObject tree;
  51.  
  52.   /**
  53.    * This attribute is a boolean indicating single selection.
  54.    */
  55.   readonly attribute boolean single;
  56.  
  57.   /**
  58.    * The number of rows currently selected in this tree.
  59.    */
  60.   readonly attribute long count;
  61.  
  62.   /**
  63.    * Indicates whether or not the row at the specified index is
  64.    * part of the selection.
  65.    */
  66.   boolean isSelected(in long index);
  67.  
  68.   /**
  69.    * Deselect all rows and select the row at the specified index. 
  70.    */
  71.   void select(in long index);
  72.  
  73.   /**
  74.    * Perform a timed select.
  75.    */
  76.   void timedSelect(in long index, in long delay);
  77.  
  78.   /**
  79.    * Toggle the selection state of the row at the specified index.
  80.    */
  81.   void toggleSelect(in long index);
  82.  
  83.   /**
  84.    * Select the range specified by the indices.  If augment is true,
  85.    * then we add the range to the selection without clearing out anything
  86.    * else.  If augment is false, everything is cleared except for the specified range.
  87.    */
  88.   void rangedSelect(in long startIndex, in long endIndex, in boolean augment);
  89.  
  90.   /**
  91.    * Clears the range.
  92.    */
  93.   void clearRange(in long startIndex, in long endIndex);
  94.  
  95.   /**
  96.    * Clears the selection.
  97.    */
  98.   void clearSelection();
  99.  
  100.   /**
  101.    * Inverts the selection.
  102.    */
  103.   void invertSelection();
  104.  
  105.   /**
  106.    * Selects all rows.
  107.    */
  108.   void selectAll();
  109.  
  110.   /**
  111.    * Iterate the selection using these methods.
  112.    */
  113.   long getRangeCount();
  114.   void getRangeAt(in long i, out long min, out long max);
  115.  
  116.   /**
  117.    * Can be used to invalidate the selection.
  118.    */
  119.   void invalidateSelection();
  120.  
  121.   /**
  122.    * Called when the row count changes to adjust selection indices.
  123.    */
  124.   void adjustSelection(in long index, in long count);
  125.  
  126.   /**
  127.    * This attribute is a boolean indicating whether or not the
  128.    * "select" event should fire when the selection is changed using
  129.    * one of our methods.  A view can use this to temporarily suppress
  130.    * the selection while manipulating all of the indices, e.g., on 
  131.    * a sort.
  132.    */
  133.   attribute boolean selectEventsSuppressed;
  134.  
  135.   /**
  136.    * The current item (the one that gets a focus rect in addition to being
  137.    * selected).
  138.    */
  139.   attribute long currentIndex;
  140.  
  141.   /**
  142.    * The selection "pivot".  This is the first item the user selected as
  143.    * part of a ranged select.
  144.    */
  145.   readonly attribute long shiftSelectPivot;
  146. };
  147.